<link href="__PUBLIC__/admin/css/layout.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/js/pagination/pagination.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
<link href="../Public/css/purview.css" rel="stylesheet" type="text/css" />
<div id="container">
<div class="tab">
	<ul>
		<li><a href="{:U('portal/Channel/admin')}">频道管理</a></li>
		<li><a href="{:U('portal/Channel/add')}">增加频道</a></li>
		<!--<li><a href="{:U('portal/Purview/index')}">权限管理</a></li>-->
        <li><a class="on" href="{:U('portal/Channel/temp')}">模板管理</a></li>
	</ul>
</div>	
 <form action="{:U('portal/Channel/doSetTempHtml')}" method="post">
<table class="tableborder" width="100%">
<tr>
		  <th colspan="2" class="header">模板管理</th>
		</tr>
      <tr class="label cell">
        <td>说明</td>
        <td>数据</td>
      </tr>
      <tr class="cell">
        <td class="altbg1">选择模板：</td>
        <td class="altbg2">  <select name="channel" id="channel" class="in_put_01" onchange="changFile()">
                        <volist name='fileArr' id='vo'>
                            <option value="{$vo}">{$vo}</option>
                        </volist>
                    </select>
                    <select name="file" id="file" class="in_put_01" onchange="changFile()">
                       <option value="index.html">index.html</option>
                       <option value="article.html">article.html</option>
                       <option value="articlelist.html">articlelist.html</option>
                    </select>
                     </td>
      </tr>
      <tr class="cell">
        <td class="altbg1">编辑模板：</td>
        <td class="altbg2"><textarea name="html" cols="100" rows="25" id="html">{$html}</textarea></td>
      </tr>      
      <tr>
        <td colspan="2" class="footer"><input type="submit" name="botton2" class="btn_sea" value=" 保 存 "/></td>
      </tr>
    </table>
 </form>
</div>
<script type="text/javascript">
$(function(){
   var channel = "{:$_GET['channel']}";
   var file    = "{:$_GET['file']}";

   if(channel!='' && channel!='undefined'){
	   $("#channel").val(channel);	  
   }
   
   if(file!='' && file!='undefined'){
	   $("#file").val(file);	  
   }   
});

function changFile(){
   var channel = $("#channel").val();
   var file    = $("#file").val();
   
   var url = "{:U('portal/Channel/temp')}&channel="+channel+"&file="+file;
   window.location.href = url;
}
</script>